<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <textarea id="mytextarea"> Hello,World!</textarea>
    <button>点击获取文本内容</button>




    <!-- <script src="../libs/tinymce_5.5.1/jquery.tinymce.min.js"></script> -->
    <script src="../libs/tinymce_5.5.1/tinymce.min.js"></script>

    <script>
        tinymce.init({
            selector: '#mytextarea',
            language: 'zh_CN',//注意大小写
        });

        document.querySelector('button').onclick = function () {

            var cnt = tinymce.editors['mytextarea'].getContent();
            console.log(cnt);
        }

    </script>
</body>

</html>